package com.onland.dfish.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.util.Date;

/**
 * 视频实体类
 */
@Data
@Alias("videos")
@TableName("`t_videos`")
public class Videos {
    /**
     * 视频id
     */
    @TableId(type = IdType.AUTO)
    @TableField("`id`")
    private Integer id;
    /**
     * 视频标题
     */
    @TableField("`title`")
    private String title;
    /**
     * 视频url
     */
    @TableField("`url`")
    private String url;
    /**
     * 视频封面
     */
    @TableField("`logo`")
    private String logo;
    /**
     * 观看数
     */
    @TableField("`play_num`")
    private Integer playNum;
    /**
     * 点赞数
     */
    @TableField("`like_num`")
    private Integer likeNum;
    /**
     * 评论数
     */
    @TableField("`comment_num`")
    private Integer commentNum;
    /**
     * 视频时长
     */
    @TableField("`duration`")
    private Integer duration;
    /**
     * 视频添加时间
     */
    @TableField("`add_time`")
    private Date addTime;
    /**
     * 用户id
     */
    @TableField("`user_id`")
    private Integer userId;
    /**
     * 视频一级类型id
     */
    @TableField("`style1_id`")
    private Integer style1Id;
    /**
     * 视频二级类型id
     */
    @TableField("`style2_id`")
    private Integer style2Id;

    @Override
    public String toString() {
        return "Videos{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", url='" + url + '\'' +
                ", logo='" + logo + '\'' +
                ", playNum=" + playNum +
                ", likeNum=" + likeNum +
                ", commentNum=" + commentNum +
                ", duration=" + duration +
                ", addTime=" + addTime +
                ", userId=" + userId +
                ", style1Id=" + style1Id +
                ", style2Id=" + style2Id +
                '}';
    }
}
